﻿@{
    Layout = null;

    var moduleSEModel = ViewBag.moduleSEModel as NB.MGJ.Model.Origins_ModuleSE;
    var materialModel = ViewBag.materialModelas as NB.MGJ.Model.Origins_Material;
    var exDic = ViewBag.exDic as Dictionary<string, string>;
    var flowList = ViewBag.flowList as List<NB.MGJ.Model.OriginsEntity.FlowSEModel>;



    var Fw_SecretCode = ViewBag.Fw_SecretCode;
    
    
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>黄金版</title>

    <link href="~/Content/TraceSource/ExperienceCenter.css" rel="stylesheet" />
    <link href="~/Content/TraceSource/tpcj_se.css" rel="stylesheet" />
    <link href="~/Content/TraceSource/style_se.css" rel="stylesheet" />
    <link href="~/Content/TraceSource/form_se.css" rel="stylesheet" />
    <link href="~/Content/CommonCss/BootStrap/bootstrap.css" rel="stylesheet" />
</head>
<body>
    <div>
        @*this is StandardEditionIndex

            @moduleSEModel.ProductName;*@

        @*<div class="model-bar">
            <div class="phone-bar">*@
        <h3 class="phone-title">
            <span class="iconfont icon-jiantou1 back-icon" style="margin-left:20px;">
            </span> 产品详情
        </h3>
        <div class="phone-con-bar">
            @if (moduleSEModel.Picture == "")
            {
                <img src="~/Content/Images/ico-nav/default/product-logo-default.png" class="phone-pro-pic show-img" />
            }
            else
            {
                <img src="@moduleSEModel.Picture" class="phone-pro-pic show-img" />
            }

            @*<div class="phone-pro-name-bar">
                    <h3 class="phone-pro-name" id="phone-product-name">产品名称：@moduleSEModel.ProductName</h3>
                    <p class="phone-pro-brand" id="phone-brand">
                        请选择批次
                    </p>
                </div>*@
            @*<div class="format-bar">
                    规格参数
                </div>*@
            <ul class="format-ul clearfix" style="display: inline-block;">
                <li>
                    <span class="format-name">产品名称：</span>
                    <span class="format-con" id="phone-product-name">@moduleSEModel.ProductName</span>
                </li>

                <li>
                    <span class="format-name">产品编号：</span>
                    <span class="format-con" id="phone-product-bar">@moduleSEModel.ProductCode</span>
                </li>
                <li>
                    <span class="format-name">产地：</span>
                    <span class="format-con" id="phone-product-place">@moduleSEModel.ProduceArea</span>
                </li>
                <li>
                    <span class="format-name">规格：</span>
                    <span class="format-con" id="phone-product-format">@moduleSEModel.Format</span>
                </li>

                @if (exDic != null && exDic.Count > 0)
                {
                    foreach (KeyValuePair<string, string> item in exDic)
                    {
                        <li class="mobile-hidden-li mobile-show-li">
                            <span class="format-name">@item.Key：</span>
                            <span class="format-con">@item.Value</span>
                        </li>
                    }
                }


            </ul>


            @if (flowList.Count > 0)
            {
                <ul class="mobile-trace" id="phone_show_id">
                    <li class="mobile-trace-title">商品追溯</li>


                    @for (var i = 0; i < flowList.Count; i++)
                    {
                        var t = i + 1;
                        <li class="mobile-trace-list clearfix">
                            <p class="trace-step pull-left">
                                第<span class="static-num">@t</span>步
                            </p>
                            <div class="left-trace-info pull-left">
                                <div class="big-bg">
                                </div>
                                <p class="trace-content-title">
                                    @flowList[i].title
                                </p>
                                <img class="" src="@flowList[i].img">
                            </div>
                        </li>
                    }



                </ul>
            }






        </div>
        <p>技术支持：码管家云系统&nbsp;版权所有</p>
    </div>
    <div style="width: 100%; height: 50px;"></div>
    <div style="width: 100%; height: 50px; position: fixed; bottom: 0; left: 0; background: #444; display: flex; justify-content: space-around; align-items: center; ">
        <div class="col-sm-9" style="width:100%">
            <input type="text" id="verCode" placeholder="请输入4位验证码查真伪" class="form-control" />
            <input type="hidden" id="Fw_SecretCode" value="@Fw_SecretCode" />
        </div>
        <div class="col-sm-3">
            <button class="btn btn-success form-control" id="search">查询真伪</button>
        </div>
    </div>
</body>
</html>



<script>


    $("#search").click(function () {

        FwSearch();

    })




    function FwSearch() {

        var Fw_SecretCode = $("#Fw_SecretCode").val();
        var searchType = "Fw_CodeSecret";
        var verCode = $("#verCode").val();

        $.ajax({
            url: "/CodeSearch/ValidateCodeLastFour",
            type: "POST",
            dataType: "json",
            data: { code: Fw_SecretCode, verCode: verCode },
            success: function (data) {
         
                if (data) {


                    //$(_this).attr("href", "/CodeSearch/AntifakeSearchResult?code=" + code + "&type=" + searchType + "&verCode=" + verCode);
                    window.location = "/CodeSearch/AntifakeSearchResult?code=" + Fw_SecretCode + "&searchType=" + searchType + "&verCode=" + verCode


                } else {

                    alert("验证码错误")


                }




            }




        });


    }






</script>